Eecient Inference of Object Types

نویسنده

  • Jens Palsberg
چکیده

Abadi and Cardelli have recently investigated a calculus of objects 2]. The calculus supports a key feature of object-oriented languages: an object can be emulated by another object that has more reened methods. Abadi and Cardelli presented four rst-order type systems for the calculus. The simplest one is based on nite types and no subtyping, and the most powerful one has both recursive types and subtyping. Open until now is the question of type inference, and in the presence of subtyping \the absence of minimum typings poses practical problems for type inference" 2]. In this paper we give an O(n 3) algorithm for each of the four type inference problems and we prove that all the problems are P-complete. We also indicate how to modify the algorithms to handle functions and records.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Eecient Inference of Partial Types

Partial types for the -calculus were introduced by Thatte in 1988 [8] as a means of typing objects that are not typable with simple types, such as heterogeneous lists and persistent data. In that paper he showed that type inference for partial types was semidecidable. Decidability remained open until quite recently, when O'Keefe and Wand [5] gave an exponential time algorithm for type inference...

متن کامل

Extending the Qualitative Trajectory Calculus Based on the Concept of Accessibility of Moving Objects in the Paths

Qualitative spatial representation and reasoning are among the important capabilities in intelligent geospatial information system development. Although a large contribution to the study of moving objects has been attributed to the quantitative use and analysis of data, such calculations are ineffective when there is little inaccurate data on position and geometry or when explicitly explaining ...

متن کامل

Subtyping Functional+Nonempty Record Types

Solving systems of subtype constraints (or subtype inequalities) is in the core of eecient type reconstruction in modern object-oriented languages with subtyping and inheritance, two problems known polynomial time equivalent. It is important to know how diierent combinations of type constructors innuence the complexity of the problem. We show the NP-hardness of the satissability problem for sub...

متن کامل

TDL--- A Type Description Language for Constraint-Based Grammars

This paper presents TDL, a typed feature-based representation language and inference system. Type deeni-tions in TDL consist of type and feature constraints over the boolean connectives. TDL supports open-and closed-world reasoning over types and allows for partitions and incompatible types. Working with partially as well as with fully expanded types is possible. EEcient reasoning in TDL is acc...

متن کامل

Flexible search-based approach for morphological shape decomposition

Mathematical morphology is well-suited to capturing geometric information. Hence, morphology-based approaches have been popular for object shape representation. The two primary morphology-based approaches, the morphological skeleton and the morphological shape decomposition (MSD), each represent an object as a collection of disjoint sets. A practical shape representation scheme, though, should ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1995